package com.itheima.mall.mapper.smsMapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.sms.SmsFlashPromotionProductRelation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface SmsFlashPromotionProductRelationMapper extends BaseMapper<SmsFlashPromotionProductRelation> {
    //获得商品对应数量
    @Select("select count(*) from sms_flash_promotion_product_relation where flash_promotion_id=#{flashPromotionId} and flash_promotion_session_id=#{id}")
    Integer getProductCount(Long flashPromotionId, Long id);
}
